<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="root">
			<!-- 数组形式1 -->
			<div class="basic" :style="[styleObj, styleObj2]">
			        {{ name }}
			</div>
			<!-- 数组形式2 -->
			<div class="basic" :style="styleArr">
			        {{ name }}
			</div>
		</div>
		
		<script type="text/javascript">
			const vm = new Vue({
				el: "#root",
				data: {
					name:'test',
					styleObj:{
						fontSize: '40px',
					    color: 'red',
				    },
					styleObj2:{
					    background: 'green'
				    },
					styleArr:[
					   { color: 'orange' },
					   { background: 'grey' }
				   ]
				}
			})
		</script>
		<style>
			.basic{
				width: 400px;
				height: 100px;
				border: 1px solid black;
			}
		</style>
	</body>
</html>